#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
using namespace std;
const int N = 110;
int arr[N];
int n, m;
int main()
{
	while (~scanf("%d",&n)) {
		memset(arr, 0, sizeof(arr));
		for (int i = 0; i < n; i++) {
			scanf("%d", &arr[i]);
		}
		scanf("%d", &m);
		while (m--) {
			int x;
			scanf("%d", &x);
			if (x >= 10001) {
				cout << "NO" << endl;
				continue;
			}
			sort(arr, arr + n);
			for (int i = n - 1; i >= 0; i--) {
				if (x >= arr[i]) {
					x -= arr[i];
				}
			}
			if (x == 0) {
				cout << "YES" << endl;
			}
			else {
				cout << "NO" << endl;
			}	
		}
	}
	return 0;
}